package com.xinqi.modules.chat.chat.official.dto.req;

import com.xinqi.common.core.enums.ChatRemindTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 新奇提醒消息记录表-请求对象-新增
 *
 * @author: yyzhen
 * @date: 2023/05/06
 */
@Data
@Schema(description = "新奇提醒消息记录表-请求对象-新增")
public class ChatRemindContentCreateDTO implements Serializable {

    /**
     * 接收用户ID
     */
    @Schema(description = "接收用户ID", example = "10001")
    @NotNull(message = "{remind.content.userId.not.blank}")
    private Long userId;
    /**
     * 提醒消息类型
     */
    @Schema(description = "提醒消息类型", example = "comment")
    @NotNull(message = "{remind.content.type.not.blank}")
    private ChatRemindTypeEnum type;
    /**
     * 课程类型
     */
    @Schema(description = "课程类型", example = "3")
    private Integer contentType;
    /**
     * 课程内容ID
     */
    @Schema(description = "课程内容ID", example = "10001")
    private Long contentId;
    /**
     * 作业使用 -- 轮数
     */
    @Schema(description = "作业使用 -- 轮数", example = "1")
    private Integer times;

    /**
     * 课程ID
     */
    @Schema(description = "课程ID", example = "10001")
    private Long courseId;
    /**
     * 班级ID
     */
    @Schema(description = "班级ID", example = "10001")
    private Long classId;
    /**
     * 提醒消息
     */
    @Schema(description = "提醒消息", example = "XXX")
    @NotEmpty(message = "{remind.content.content.not.blank}")
    private String content;

    @Schema(description = "操作数据")
    private String data;

    public ChatRemindContentCreateDTO() {

    }

    public ChatRemindContentCreateDTO(Long userId, Long classId, ChatRemindTypeEnum type, String content) {
        this.userId = userId;
        this.classId = classId;
        this.type = type;
        this.content = content;
        this.contentType = null;
        this.contentId = null;
    }

    public ChatRemindContentCreateDTO(Long userId, Long courseId, Long classId, ChatRemindTypeEnum type, String content) {
        this.userId = userId;
        this.classId = classId;
        this.type = type;
        this.content = content;
        this.courseId = courseId;
        this.contentType = null;
        this.contentId = null;
    }

    public ChatRemindContentCreateDTO(Long userId, ChatRemindTypeEnum type, String content) {
        this.userId = userId;
        this.type = type;
        this.content = content;
        this.classId = null;
        this.contentType = null;
        this.contentId = null;
    }

    public ChatRemindContentCreateDTO(Long userId, ChatRemindTypeEnum type, String content, String data) {
        this.userId = userId;
        this.type = type;
        this.content = content;
        this.classId = null;
        this.contentType = null;
        this.contentId = null;
        this.data = data;
    }
}
